<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
  <button>

    按钮
  </button>
  <script>
//内置函数（第三方库）：根据一些经验,Vue传入生命周期函数
//1.定时器

    // function hySetTimeout(fn) {
    //   fn()
    // }
  
    //1.定时器
    // setTimeout(function() {
    //     console.log("定时器函数：",this)  //默认指向Window
    // },10000)

    //2.按钮的点击监听
    // var btnE1 = document.querySelector("button")
    // btnE1.onclick = function() {
    //   console.log("btn的点击：",this)
    // }
    // btnE1.addEventListener("click:",function(){
    //   console.log("btn的点击：",this)
    // })
    //forEach
    var names = ["abc","cba","nba"]
    names.forEach(function(item){
      console.log("foeEach:",this)
    },"aaaaaa")  //显示绑定
  </script>
</body>
</html>